/*
 * @Author: your name
 * @Date: 2021-03-17 18:06:06
 * @LastEditTime: 2021-03-18 10:11:06
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \adminc:\Users\dell\Desktop\react (1)\my-app\src\setupProxy.js
 */
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
  app.use(createProxyMiddleware('/',
    {

      target: 'https://testwap.liangbaba.com', //转发到的域名或者ip地址    
      pathRewrite: {
        '^/': '', //接口地址里没有"/",将其重写置空    
      },
      changeOrigin: true, //必须设置为true
      // secure: true//是否验证https的安全证书，如果域名是https需要配置此项  
    }));
};
